[PHP] Check Valid date type

Posted by yukou on Stack Overflow See other posts from Stack Overflow or by yukou
Published on 2011-06-24T15:02:37Z Indexed on 2011/06/24 16:22 UTC
Read the original article Hit count: 155

Filed under:
|
|
|

may be this question had been asked, I've searched but still not confident about my problem..

my problem is checking valid date from string

$a='23-June-11'; //valid
$b='Normal String';//invalid

I want to convert $a and $b using strtotime() before I do that, of course i want to validate whether $a or $b is a valid date format

From $a i can get 23, 11 using explode function, but how about 'June'? using function above, 'June' is not numeric

© Stack Overflow or respective owner

Related posts about php

Related posts about date